Skip to content

Conversation

@areski
Copy link
Contributor

@areski areski commented Oct 23, 2014

  • shrink_to_fit example is now more clear by asserting the capacity value
  • annotation [0, mid) changed for [0, mid]

@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @huonw (or someone else) soon.

@thestinger
Copy link
Contributor

An assert of the capacity will work right now, but there's no guarantee that it will drop all the way down to the length in the future. It will drop down as close as possible to the length but the allocator may still inform the vector that there is space for a few more elements.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this line changed? If it's exclusive, it should be a ).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks I removed this now, I thought it was a mistake in the annotation

- shrink_to_fit example is now more clear by asserting the capacity value
@areski areski force-pushed the pr-fix-vec-doc-example branch from c5a5f5e to fe6847a Compare October 23, 2014 14:46
@areski
Copy link
Contributor Author

areski commented Oct 23, 2014

@thestinger thanks for the clarification, then we can dismiss this PR and just add your comment after the line "Shrinks the capacity of the vector as much as possible."

@alexcrichton
Copy link
Member

@areski do you want to update this PR with @thestinger's comment?

… as close as possible but not to the minimun
@areski
Copy link
Contributor Author

areski commented Oct 27, 2014

@alexcrichton I just updated the Pr with the feedback, let me know

bors added a commit that referenced this pull request Oct 28, 2014
…hton

- shrink_to_fit example is now more clear by asserting the capacity value
- annotation [0, mid) changed for [0, mid]
@bors bors closed this Oct 28, 2014
@bors bors merged commit a446b68 into rust-lang:master Oct 28, 2014
lnicola pushed a commit to lnicola/rust that referenced this pull request Oct 29, 2024
fix: Nail destructuring assignment once and for all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants